<?php
namespace Home\Controller;
use Org\Net\Http;
use Think\Controller;
class FileController extends Controller 
{

    public function lst()
    {
    	$model = D('File');
    	$data = $model->search();
    	$this->assign(array(
    		'data' => $data['data'],
    		'page' => $data['page'],
    	));
    	$this->display();
    }

	public function upload($id)
	{
		$model = D('File');
		$data =$model->find($id);
		 import('ORG.Net.Http');
         Http::download('Public/Uploads/' .$data['file_adress'],$data['name']);
	}
}